{include file="common/header"/}
<div class="lemo-container">
    <div class="lemo-main">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>客户报价列表</legend>

            <blockquote class="layui-elem-quote">
                <div class="lemo-table">
                    <a data-href='{:url("addCustomerQuotation")}' href="javascript:;" class="layui-btn layui-btn-sm layui-btn-warm add">添加</a>
                </div>

            </blockquote>

        </fieldset>

        <table class="layui-table" id="list" lay-filter="list"></table>
    </div>
</div>
{include file="common/footer"/}

<script type="text/html" id="action">
    <a data-href="{:url('groupEdit')}?id={{d.id}}" class="layui-btn layui-btn-xs" lay-event="edit">{:lang('edit')}</a>

    <a data-href="{:url('groupDel')}" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">{:lang('del')}</a>
    
</script>

<script>
    var tableIn;
    layui.config({
        base: "/static/admin/js/",
        version: true
    }).extend({
        Admin: 'Admin'
    }).use(['element', 'layer', 'Admin'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table;
        tableIn = table.render({
            elem: '#list',
            url: '{:url("customerQuotation")}',
            method:'post',
            title:'{:lang("admin")}{:lang("list")}',
            cols: [[
                {field:'id', title: 'ID', width:60,fixed: true}
                ,{field:'customer_name', title: '客户名称', width:180, templet: function (d) {
                    return `<a data-href="{:url('customer')}?id=${d.id}" class="layui-btn-xs" lay-event="customer">${d.customer_name}</a>`
                }}
                ,{field:'shop_no', title: '店管家号', width:240}
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 15,
            page: true,
        });
    });
</script>
